package com.zhoufy.spi.test;

import com.alibaba.dubbo.common.URL;
import com.alibaba.dubbo.common.extension.ExtensionLoader;
import com.zhoufy.server.HelloService;

/**
 * Created with IntelliJ IDEA by ChouFy on 2020-05-04.
 *
 * @author chouFy
 */
public class DubboAdaptiveMain {

    public static void main(String[] args) {
        URL url = URL.valueOf("test://localhost/hello?hello.service=human");

        ExtensionLoader<HelloService> extensionLoader = ExtensionLoader.getExtensionLoader(HelloService.class);

        HelloService adaptiveExtension = extensionLoader.getAdaptiveExtension();
        String s = adaptiveExtension.sayHello(url);
        System.out.println(s);
    }

}
